package com.xxl.job.admin.service;

import com.xxl.job.admin.dto.CronJobDetailsDto;
import com.xxl.job.admin.dto.CronJobRequest;
import com.xxl.job.admin.dto.JobResultDTO;
import com.xxl.job.admin.dto.Page;

import java.util.List;

public interface CronJobService {
    // 获取定时任务的详细信息
    Page<CronJobDetailsDto> getCronJobDetails(String ip,
                                              String owner,
                                              String systemName,
                                              String serverUser,
                                              String command,
                                              int page,
                                              int size);


    // 根据 JobHandler 查询执行器 ID
    Integer findExecutorIdByJobHandler(String jobHandler);

    // 更新定时任务的状态
    void updateCronJobStatus(long jobId, int status,String schedule);

    CronJobDetailsDto findById(long jobId);

    void updateCronJob(long jobId, String schedule, String command, String owner, String systemName,Integer newStatus);

    //新增定时任务
    void addCronJob(CronJobRequest cronJobRequest);

    Integer findJobIdByAddWork(String ip,String schedule, String command);



}
